home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_1 / circles < prev    next >
Internet Message Format  |  1995-03-31  |  6KB

  1. From comp.sys.handhelds Sun Jun  9 13:56:08 1991
  2. Path: seq!ecsgate!mcnc!gatech!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!cs.umn.edu!uc!noc.MR.NET!gacvx2.gac.edu!hhdist
  3. From: CW%APG.PH.UCL.AC.UK@CUNYVM.CUNY.EDU
  4. Newsgroups: comp.sys.handhelds
  5. Subject: ML Circles
  6. Message-ID: <89C854C2C00019BA@gacvx2.gac.edu>
  7. Date: 6 Jun 91 15:53:16 GMT
  8. Lines: 122
  9. Return-path: <@CUNYVM.CUNY.EDU:CW@APG.PH.UCL.AC.UK>
  10. To: HANDHELDS@gac.edu
  11. Via:      UK.AC.UCL.PH.APG;  6 JUN 91 15:54:05 BST
  12.  
  13.  
  14.  
  15.          Lightning strikes, the ESD readings flicker momentarily, and
  16.        a solitary dark cowelled figure is silouetted against the dungeon
  17.        wall. He seems to be leaning over a small oblong object that you
  18.        would estimate to be about 7'x3'x1' in size. With a blood curdling
  19.        shriek he falls to the ground and seems to melt away into
  20.        nothingnessnous leaving behind only his cowel and ... and ...
  21.        a peice of paper lying on the floor by the cowel, you
  22.        assume he must have been holding it in his hand afore his dreaded fate.
  23.        Moving forward carefully you pick up the piece of paper, and upon
  24.        examination you find it to be an incantation of sorts. You read on
  25.        terror emptying into your heart with every word
  26.  
  27.             "  The following is a machine code routine to draw
  28.                Circles quite quickly on the present PICT GROB.
  29.                The GROB can be any size as the routine reads
  30.                the size of the GROB itself. It is fairly robust -
  31.                All plotting is kept within the GROB area. If
  32.                PICT does not exist then it creates the default
  33.                131x64 PICT. It does some very rudimentry arguament
  34.                checking. (If anybody could send a quick tutorial
  35.                on checking arguaments in system RPL to C.S.H I
  36.                would be very grateful!). All in all it should
  37.                work well, but if you have any problems let me
  38.                know. When stored in the variable 'CIRCLE' it
  39.                has the checksum #77c7h and takes up 305 bytes.
  40.                It takes as arguaments
  41.  
  42.                           2:        { #x  #y }
  43.                           1:                r
  44.  
  45.                where { #x #y } is the pixel coordinate of the
  46.                centre of the circle (#x,#y are binary integers),
  47.                and r is a real number representing the radius
  48.                of the circle in pixels. Also included are two
  49.                demonstration routines to give you a taste of
  50.                what's possible. The ->ASC encoded version of
  51.                'CIRCLE' follows
  52. --------------------------------------------------------------------------------
  53. %%HP: T(1)A(D)F(.);
  54. "D9D20AEC81322302351566115CCD20A22008FD5F3081AF0B81AF028F1466081A
  55. F048FB9760D281AF0881AF1C8AE606F90C6FA818F2281AF097D9081AF1980824
  56. FFFF78B6E1818F2581AF10C4C4C281AF09613081AF1CCE81AF0C81AF10EAC4C4
  57. 818F0581AF19C281AF0981AF10E481AF0081AF1C8B2688A6607C108D34150D78
  58. 1AF13D876A08D341507F50C3C873907350C3E877807560C3C87B707950C3E87F
  59. 607F20E3C873607320E3E877507530E3C87B407920E3E87F3050081AF1BD581A
  60. F1AD781AF1C81AF100181AF1BD581AF1AD781AF1881AF14011B5650714613416
  61. E142D606CCDB8B257184146CED48B66616913207819F2819F2819F2E6C6CD480
  62. CA68FFDBD5D680824300000EF4E58B0A0FCC50EF4819F3819F3CB1371430EF81
  63. 41010701B21307C77"
  64. --------------------------------------------------------------------------------
  65.  
  66.                The two demonstration routines follow:-
  67.  
  68.                DEMO1 is
  69. --------------------------------------------------------------------------------
  70. %%HP: T(3)A(D)F(.);
  71. \<<
  72.     # 150d # 150d
  73.       PDIM
  74.       { # 0d # 0d } PVIEW
  75.       0 149 FOR i
  76.         i R\->B 75 R\->B 2 \->LIST i 75 - ABS CIRCLE
  77.       3 STEP
  78. \>>
  79. --------------------------------------------------------------------------------
  80.  
  81.                DEMO2 is
  82. --------------------------------------------------------------------------------
  83. %%HP: T(3)A(D)F(.);
  84. \<<
  85.    { # 0d # 0d } PVIEW
  86.    10 130 FOR i
  87.      10 64 FOR j
  88.        i R\->B j R\->B 2 \->LIST 10 CIRCLE
  89.      10 STEP
  90.    10 STEP
  91. \>>
  92. --------------------------------------------------------------------------------
  93.                I hope this is clear and that some people
  94.                find this useful. Please let me know your
  95.                thoughts on how this routine could be improved.
  96.                I for one am going to try and make it even faster!!!
  97.                Thats all for now except for the disclaimer
  98.  
  99.                I accept no responsibility for anything done
  100.                by this program constructive or destructive, but
  101.                be warned, never ever on any account use this
  102.                program in a damp dungeon where water may drop
  103.                on your calculator and cause serious electric
  104.                shock, or worse still damage it.
  105.  
  106.                           YOU HAVE BEEN WARNED!             "
  107.  
  108.          You notice the paper is rather grusomely charred, and
  109.          there is the smell of ozone in the air. A thought enters
  110.          your mind
  111.  
  112.               "I can't afford an HP48, and this bloke certainly
  113.                won't be needing his anymore!"
  114.  
  115.          You turn and pick it up
  116.  
  117.          "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGH  ZAP SPLAT"
  118.  
  119.          As your body melts around you, you see the screen of the
  120.          calculator and you notice with horror your death was in
  121.          vain for on the screen are the words
  122.  
  123.  
  124.                "GATEWAY
  125.  
  126.  
  127.                      ENTER CODE"
  128.  
  129.  
  130.  
  131.                       :-)
  132.  
  133.  
  134.             Conrad
  135.  
  136.